3.15.86 \(\int \sec ^3(c+d x) (a+b \sin (c+d x)) \tan ^2(c+d x) \, dx\) [1486]

3.15.86.1 Optimal result
3.15.86.2 Mathematica [A] (verified)
3.15.86.3 Rubi [A] (verified)
3.15.86.4 Maple [A] (verified)
3.15.86.5 Fricas [A] (verification not implemented)
3.15.86.6 Sympy [F(-1)]
3.15.86.7 Maxima [A] (verification not implemented)
3.15.86.8 Giac [A] (verification not implemented)
3.15.86.9 Mupad [B] (verification not implemented)

3.15.86.1 Optimal result

Integrand size = 27, antiderivative size = 74 \[ \int \sec ^3(c+d x) (a+b \sin (c+d x)) \tan ^2(c+d x) \, dx=-\frac {a \text {arctanh}(\sin (c+d x))}{8 d}-\frac {a \sec (c+d x) \tan (c+d x)}{8 d}+\frac {a \sec ^3(c+d x) \tan (c+d x)}{4 d}+\frac {b \tan ^4(c+d x)}{4 d} \]

output
-1/8*a*arctanh(sin(d*x+c))/d-1/8*a*sec(d*x+c)*tan(d*x+c)/d+1/4*a*sec(d*x+c 
)^3*tan(d*x+c)/d+1/4*b*tan(d*x+c)^4/d
 
3.15.86.2 Mathematica [A] (verified)

Time = 0.01 (sec) , antiderivative size = 74, normalized size of antiderivative = 1.00 \[ \int \sec ^3(c+d x) (a+b \sin (c+d x)) \tan ^2(c+d x) \, dx=-\frac {a \text {arctanh}(\sin (c+d x))}{8 d}-\frac {a \sec (c+d x) \tan (c+d x)}{8 d}+\frac {a \sec ^3(c+d x) \tan (c+d x)}{4 d}+\frac {b \tan ^4(c+d x)}{4 d} \]

input
Integrate[Sec[c + d*x]^3*(a + b*Sin[c + d*x])*Tan[c + d*x]^2,x]
 
output
-1/8*(a*ArcTanh[Sin[c + d*x]])/d - (a*Sec[c + d*x]*Tan[c + d*x])/(8*d) + ( 
a*Sec[c + d*x]^3*Tan[c + d*x])/(4*d) + (b*Tan[c + d*x]^4)/(4*d)
 
3.15.86.3 Rubi [A] (verified)

Time = 0.56 (sec) , antiderivative size = 79, normalized size of antiderivative = 1.07, number of steps used = 11, number of rules used = 10, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.370, Rules used = {3042, 3313, 3042, 3087, 15, 3091, 3042, 4255, 3042, 4257}

Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.

\(\displaystyle \int \tan ^2(c+d x) \sec ^3(c+d x) (a+b \sin (c+d x)) \, dx\)

\(\Big \downarrow \) 3042

\(\displaystyle \int \frac {\sin (c+d x)^2 (a+b \sin (c+d x))}{\cos (c+d x)^5}dx\)

\(\Big \downarrow \) 3313

\(\displaystyle a \int \sec ^3(c+d x) \tan ^2(c+d x)dx+b \int \sec ^2(c+d x) \tan ^3(c+d x)dx\)

\(\Big \downarrow \) 3042

\(\displaystyle a \int \sec (c+d x)^3 \tan (c+d x)^2dx+b \int \sec (c+d x)^2 \tan (c+d x)^3dx\)

\(\Big \downarrow \) 3087

\(\displaystyle a \int \sec (c+d x)^3 \tan (c+d x)^2dx+\frac {b \int \tan ^3(c+d x)d\tan (c+d x)}{d}\)

\(\Big \downarrow \) 15

\(\displaystyle a \int \sec (c+d x)^3 \tan (c+d x)^2dx+\frac {b \tan ^4(c+d x)}{4 d}\)

\(\Big \downarrow \) 3091

\(\displaystyle a \left (\frac {\tan (c+d x) \sec ^3(c+d x)}{4 d}-\frac {1}{4} \int \sec ^3(c+d x)dx\right )+\frac {b \tan ^4(c+d x)}{4 d}\)

\(\Big \downarrow \) 3042

\(\displaystyle a \left (\frac {\tan (c+d x) \sec ^3(c+d x)}{4 d}-\frac {1}{4} \int \csc \left (c+d x+\frac {\pi }{2}\right )^3dx\right )+\frac {b \tan ^4(c+d x)}{4 d}\)

\(\Big \downarrow \) 4255

\(\displaystyle a \left (\frac {1}{4} \left (-\frac {1}{2} \int \sec (c+d x)dx-\frac {\tan (c+d x) \sec (c+d x)}{2 d}\right )+\frac {\tan (c+d x) \sec ^3(c+d x)}{4 d}\right )+\frac {b \tan ^4(c+d x)}{4 d}\)

\(\Big \downarrow \) 3042

\(\displaystyle a \left (\frac {1}{4} \left (-\frac {1}{2} \int \csc \left (c+d x+\frac {\pi }{2}\right )dx-\frac {\tan (c+d x) \sec (c+d x)}{2 d}\right )+\frac {\tan (c+d x) \sec ^3(c+d x)}{4 d}\right )+\frac {b \tan ^4(c+d x)}{4 d}\)

\(\Big \downarrow \) 4257

\(\displaystyle a \left (\frac {1}{4} \left (-\frac {\text {arctanh}(\sin (c+d x))}{2 d}-\frac {\tan (c+d x) \sec (c+d x)}{2 d}\right )+\frac {\tan (c+d x) \sec ^3(c+d x)}{4 d}\right )+\frac {b \tan ^4(c+d x)}{4 d}\)

input
Int[Sec[c + d*x]^3*(a + b*Sin[c + d*x])*Tan[c + d*x]^2,x]
 
output
(b*Tan[c + d*x]^4)/(4*d) + a*((Sec[c + d*x]^3*Tan[c + d*x])/(4*d) + (-1/2* 
ArcTanh[Sin[c + d*x]]/d - (Sec[c + d*x]*Tan[c + d*x])/(2*d))/4)
 

3.15.86.3.1 Defintions of rubi rules used

rule 15
Int[(a_.)*(x_)^(m_.), x_Symbol] :> Simp[a*(x^(m + 1)/(m + 1)), x] /; FreeQ[ 
{a, m}, x] && NeQ[m, -1]
 

rule 3042
Int[u_, x_Symbol] :> Int[DeactivateTrig[u, x], x] /; FunctionOfTrigOfLinear 
Q[u, x]
 

rule 3087
Int[sec[(e_.) + (f_.)*(x_)]^(m_)*((b_.)*tan[(e_.) + (f_.)*(x_)])^(n_.), x_S 
ymbol] :> Simp[1/f   Subst[Int[(b*x)^n*(1 + x^2)^(m/2 - 1), x], x, Tan[e + 
f*x]], x] /; FreeQ[{b, e, f, n}, x] && IntegerQ[m/2] &&  !(IntegerQ[(n - 1) 
/2] && LtQ[0, n, m - 1])
 

rule 3091
Int[((a_.)*sec[(e_.) + (f_.)*(x_)])^(m_.)*((b_.)*tan[(e_.) + (f_.)*(x_)])^( 
n_), x_Symbol] :> Simp[b*(a*Sec[e + f*x])^m*((b*Tan[e + f*x])^(n - 1)/(f*(m 
 + n - 1))), x] - Simp[b^2*((n - 1)/(m + n - 1))   Int[(a*Sec[e + f*x])^m*( 
b*Tan[e + f*x])^(n - 2), x], x] /; FreeQ[{a, b, e, f, m}, x] && GtQ[n, 1] & 
& NeQ[m + n - 1, 0] && IntegersQ[2*m, 2*n]
 

rule 3313
Int[cos[(e_.) + (f_.)*(x_)]^(p_)*((d_.)*sin[(e_.) + (f_.)*(x_)])^(n_.)*((a_ 
) + (b_.)*sin[(e_.) + (f_.)*(x_)]), x_Symbol] :> Simp[a   Int[Cos[e + f*x]^ 
p*(d*Sin[e + f*x])^n, x], x] + Simp[b/d   Int[Cos[e + f*x]^p*(d*Sin[e + f*x 
])^(n + 1), x], x] /; FreeQ[{a, b, d, e, f, n, p}, x] && IntegerQ[(p - 1)/2 
] && IntegerQ[n] && ((LtQ[p, 0] && NeQ[a^2 - b^2, 0]) || LtQ[0, n, p - 1] | 
| LtQ[p + 1, -n, 2*p + 1])
 

rule 4255
Int[(csc[(c_.) + (d_.)*(x_)]*(b_.))^(n_), x_Symbol] :> Simp[(-b)*Cos[c + d* 
x]*((b*Csc[c + d*x])^(n - 1)/(d*(n - 1))), x] + Simp[b^2*((n - 2)/(n - 1)) 
  Int[(b*Csc[c + d*x])^(n - 2), x], x] /; FreeQ[{b, c, d}, x] && GtQ[n, 1] 
&& IntegerQ[2*n]
 

rule 4257
Int[csc[(c_.) + (d_.)*(x_)], x_Symbol] :> Simp[-ArcTanh[Cos[c + d*x]]/d, x] 
 /; FreeQ[{c, d}, x]
 
3.15.86.4 Maple [A] (verified)

Time = 0.52 (sec) , antiderivative size = 88, normalized size of antiderivative = 1.19

method result size
derivativedivides \(\frac {a \left (\frac {\sin ^{3}\left (d x +c \right )}{4 \cos \left (d x +c \right )^{4}}+\frac {\sin ^{3}\left (d x +c \right )}{8 \cos \left (d x +c \right )^{2}}+\frac {\sin \left (d x +c \right )}{8}-\frac {\ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{8}\right )+\frac {b \left (\sin ^{4}\left (d x +c \right )\right )}{4 \cos \left (d x +c \right )^{4}}}{d}\) \(88\)
default \(\frac {a \left (\frac {\sin ^{3}\left (d x +c \right )}{4 \cos \left (d x +c \right )^{4}}+\frac {\sin ^{3}\left (d x +c \right )}{8 \cos \left (d x +c \right )^{2}}+\frac {\sin \left (d x +c \right )}{8}-\frac {\ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{8}\right )+\frac {b \left (\sin ^{4}\left (d x +c \right )\right )}{4 \cos \left (d x +c \right )^{4}}}{d}\) \(88\)
risch \(\frac {i \left (a \,{\mathrm e}^{7 i \left (d x +c \right )}-7 a \,{\mathrm e}^{5 i \left (d x +c \right )}+8 i b \,{\mathrm e}^{6 i \left (d x +c \right )}+7 a \,{\mathrm e}^{3 i \left (d x +c \right )}-a \,{\mathrm e}^{i \left (d x +c \right )}+8 i b \,{\mathrm e}^{2 i \left (d x +c \right )}\right )}{4 d \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )^{4}}-\frac {a \ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right )}{8 d}+\frac {a \ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right )}{8 d}\) \(133\)
parallelrisch \(\frac {2 \left (\frac {3}{4}+\frac {\cos \left (4 d x +4 c \right )}{4}+\cos \left (2 d x +2 c \right )\right ) a \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )-2 \left (\frac {3}{4}+\frac {\cos \left (4 d x +4 c \right )}{4}+\cos \left (2 d x +2 c \right )\right ) a \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )+7 a \sin \left (d x +c \right )-a \sin \left (3 d x +3 c \right )-4 b \cos \left (2 d x +2 c \right )+\cos \left (4 d x +4 c \right ) b +3 b}{4 d \left (\cos \left (4 d x +4 c \right )+4 \cos \left (2 d x +2 c \right )+3\right )}\) \(152\)
norman \(\frac {\frac {a \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{4 d}+\frac {2 a \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}+\frac {7 a \left (\tan ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{2 d}+\frac {2 a \left (\tan ^{7}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}+\frac {a \left (\tan ^{9}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{4 d}+\frac {4 b \left (\tan ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}+\frac {4 b \left (\tan ^{6}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}}{\left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )^{4} \left (1+\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}+\frac {a \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}{8 d}-\frac {a \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}{8 d}\) \(187\)

input
int(sec(d*x+c)^5*sin(d*x+c)^2*(a+b*sin(d*x+c)),x,method=_RETURNVERBOSE)
 
output
1/d*(a*(1/4*sin(d*x+c)^3/cos(d*x+c)^4+1/8*sin(d*x+c)^3/cos(d*x+c)^2+1/8*si 
n(d*x+c)-1/8*ln(sec(d*x+c)+tan(d*x+c)))+1/4*b*sin(d*x+c)^4/cos(d*x+c)^4)
 
3.15.86.5 Fricas [A] (verification not implemented)

Time = 0.27 (sec) , antiderivative size = 91, normalized size of antiderivative = 1.23 \[ \int \sec ^3(c+d x) (a+b \sin (c+d x)) \tan ^2(c+d x) \, dx=-\frac {a \cos \left (d x + c\right )^{4} \log \left (\sin \left (d x + c\right ) + 1\right ) - a \cos \left (d x + c\right )^{4} \log \left (-\sin \left (d x + c\right ) + 1\right ) + 8 \, b \cos \left (d x + c\right )^{2} + 2 \, {\left (a \cos \left (d x + c\right )^{2} - 2 \, a\right )} \sin \left (d x + c\right ) - 4 \, b}{16 \, d \cos \left (d x + c\right )^{4}} \]

input
integrate(sec(d*x+c)^5*sin(d*x+c)^2*(a+b*sin(d*x+c)),x, algorithm="fricas" 
)
 
output
-1/16*(a*cos(d*x + c)^4*log(sin(d*x + c) + 1) - a*cos(d*x + c)^4*log(-sin( 
d*x + c) + 1) + 8*b*cos(d*x + c)^2 + 2*(a*cos(d*x + c)^2 - 2*a)*sin(d*x + 
c) - 4*b)/(d*cos(d*x + c)^4)
 
3.15.86.6 Sympy [F(-1)]

Timed out. \[ \int \sec ^3(c+d x) (a+b \sin (c+d x)) \tan ^2(c+d x) \, dx=\text {Timed out} \]

input
integrate(sec(d*x+c)**5*sin(d*x+c)**2*(a+b*sin(d*x+c)),x)
 
output
Timed out
 
3.15.86.7 Maxima [A] (verification not implemented)

Time = 0.20 (sec) , antiderivative size = 86, normalized size of antiderivative = 1.16 \[ \int \sec ^3(c+d x) (a+b \sin (c+d x)) \tan ^2(c+d x) \, dx=-\frac {a \log \left (\sin \left (d x + c\right ) + 1\right ) - a \log \left (\sin \left (d x + c\right ) - 1\right ) - \frac {2 \, {\left (a \sin \left (d x + c\right )^{3} + 4 \, b \sin \left (d x + c\right )^{2} + a \sin \left (d x + c\right ) - 2 \, b\right )}}{\sin \left (d x + c\right )^{4} - 2 \, \sin \left (d x + c\right )^{2} + 1}}{16 \, d} \]

input
integrate(sec(d*x+c)^5*sin(d*x+c)^2*(a+b*sin(d*x+c)),x, algorithm="maxima" 
)
 
output
-1/16*(a*log(sin(d*x + c) + 1) - a*log(sin(d*x + c) - 1) - 2*(a*sin(d*x + 
c)^3 + 4*b*sin(d*x + c)^2 + a*sin(d*x + c) - 2*b)/(sin(d*x + c)^4 - 2*sin( 
d*x + c)^2 + 1))/d
 
3.15.86.8 Giac [A] (verification not implemented)

Time = 0.36 (sec) , antiderivative size = 78, normalized size of antiderivative = 1.05 \[ \int \sec ^3(c+d x) (a+b \sin (c+d x)) \tan ^2(c+d x) \, dx=-\frac {a \log \left ({\left | \sin \left (d x + c\right ) + 1 \right |}\right ) - a \log \left ({\left | \sin \left (d x + c\right ) - 1 \right |}\right ) - \frac {2 \, {\left (a \sin \left (d x + c\right )^{3} + 4 \, b \sin \left (d x + c\right )^{2} + a \sin \left (d x + c\right ) - 2 \, b\right )}}{{\left (\sin \left (d x + c\right )^{2} - 1\right )}^{2}}}{16 \, d} \]

input
integrate(sec(d*x+c)^5*sin(d*x+c)^2*(a+b*sin(d*x+c)),x, algorithm="giac")
 
output
-1/16*(a*log(abs(sin(d*x + c) + 1)) - a*log(abs(sin(d*x + c) - 1)) - 2*(a* 
sin(d*x + c)^3 + 4*b*sin(d*x + c)^2 + a*sin(d*x + c) - 2*b)/(sin(d*x + c)^ 
2 - 1)^2)/d
 
3.15.86.9 Mupad [B] (verification not implemented)

Time = 17.84 (sec) , antiderivative size = 144, normalized size of antiderivative = 1.95 \[ \int \sec ^3(c+d x) (a+b \sin (c+d x)) \tan ^2(c+d x) \, dx=\frac {\frac {a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^7}{4}+\frac {7\,a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5}{4}+4\,b\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4+\frac {7\,a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3}{4}+\frac {a\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{4}}{d\,\left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^8-4\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6+6\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4-4\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+1\right )}-\frac {a\,\mathrm {atanh}\left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )}{4\,d} \]

input
int((sin(c + d*x)^2*(a + b*sin(c + d*x)))/cos(c + d*x)^5,x)
 
output
((a*tan(c/2 + (d*x)/2))/4 + (7*a*tan(c/2 + (d*x)/2)^3)/4 + (7*a*tan(c/2 + 
(d*x)/2)^5)/4 + (a*tan(c/2 + (d*x)/2)^7)/4 + 4*b*tan(c/2 + (d*x)/2)^4)/(d* 
(6*tan(c/2 + (d*x)/2)^4 - 4*tan(c/2 + (d*x)/2)^2 - 4*tan(c/2 + (d*x)/2)^6 
+ tan(c/2 + (d*x)/2)^8 + 1)) - (a*atanh(tan(c/2 + (d*x)/2)))/(4*d)